package Utils;

import java.io.FileWriter;
import java.io.IOException;

public class FileUtils {

    public static void saveAsFileWriter(String content, String path1) {
        if(path1=="")path1="D://test.txt";
        FileWriter fwriter = null;
        try {
            fwriter = new FileWriter(path1);
            fwriter.write(content);
        } catch (IOException ex) {
            ex.printStackTrace();
        } finally {
            try {
                fwriter.flush();
                fwriter.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }
    }

}
